package com.hzjq.core.bean

import org.json.JSONObject

class Param {
    var isSuccess = false //是否读取成功
    var signalVoltage = 0 // 通信电压
    var chargeVoltage = 0 //充电电压
    var queryVoltage = 0 //查询电压
    var chargeAdc = 0 //充电adc
    var blastAdc = 0 //起爆adc
    var blastCutPower = 0 //是否起爆断电 0：否  1：是
    var groupChargeCount = 0 // 分组充电数量
    var groupChargeSleepTime = 0 //分组充电间隔
    var reserve1 = 0 // 预留1
    var reserve2 = 0 // 预留2
    var reserve3 = 0 // 预留3
    var reserve4 = 0 // 预留4

    override fun toString(): String {
        val json = JSONObject()
        json.put("signalVoltage",signalVoltage)
        json.put("chargeVoltage",chargeVoltage)
        json.put("queryVoltage",queryVoltage)
        json.put("chargeAdc",chargeAdc)
        json.put("blastAdc",blastAdc)
        json.put("blastCutPower",blastCutPower)
        json.put("groupChargeCount",groupChargeCount)
        json.put("groupChargeSleepTime",groupChargeSleepTime)
        json.put("reserve1",reserve1)
        json.put("reserve2",reserve2)
        json.put("reserve3",reserve3)
        json.put("reserve4",reserve4)
        json.put("isSuccess",isSuccess)
        return json.toString()
    }
}